/*
 * @Description:下载文件
 * @Version: 2.0
 * @Autor: wiz
 * @Date: 2023-12-27 14:10:25
 * @LastEditors: swc
 * @LastEditTime: 2024-01-19 09:38:59
 */
import lexicon from '@/lib/lexicon';

export class T_downloadArg {
  private url: string = lexicon.url.download;

  protected fileName: string;

  // file = /fs/file/<dbName>/xxx
  // image /fs/image/<dbName>/xxx
  // temp [API: downloadAPI] /web/download/<dbName>/temp/xxx 临时文件会定时清除
  // temp [API: upload] /web/upload/<dbName>/temp/xxx  临时文件会定时清除
  protected path: string;

  public setFileName(p: string): T_downloadArg {
    this.fileName = p;
    return this;
  }

  public getFileName(): string {
    return this.fileName;
  }

  public setPath(p: string): T_downloadArg {
    this.path = p;
    return this;
  }

  public getPath(): string {
    return this.path;
  }
}
export interface I_downloadArg extends T_downloadArg {}
